import React from 'react';

function compare(prevProps, nextProps) {
  console.log(prevProps, 'prevProps');
  console.log(nextProps, 'nextProps');
  console.log(prevProps.data.id === nextProps.data.id, 'ss');
  if (prevProps.data.id === nextProps.data.id) {
    return true;
  }
  return false;
}
function Child1(props) {
  const { id, name } = props.data;
  console.log(name, 'name Child1');
  return (
    <div>
      name:{name}id:{id}
    </div>
  );
}

export default React.memo(Child1, compare);
